﻿using Microsoft.Extensions.DependencyInjection;
using TimServerSDK.Accounts;
using TimServerSDK.Core;
using TimServerSDK.Friends;
using TimServerSDK.Groups;
using TimServerSDK.Portraits;

namespace TimServerSDK
{
    public static class Extentions
    {
        /// <summary>
        /// 添加腾讯IM服务端集成
        /// </summary>
        /// <param name="services"></param>
        /// <returns></returns>
        public static IServiceCollection AddTimServerSDK(this IServiceCollection services)
        {
            services.AddScoped<IRestClientProvider, RestSharpRestClientProvider>();
            services.AddScoped<ITimServerApi, TimServerApi>();
            services.AddScoped<ITimServerOptionsFun, TimServerOptionsFun>();
            services.AddScoped<IAccountTimServerApi, AccountTimServerApi>();
            services.AddScoped<IGroupTimServerApi, GroupTimServerApi>();
            services.AddScoped<IFriendTimServerApi, FriendTimServerApi>();
            services.AddScoped<IPortraitTimServerApi, PortraitTimServerApi>();
            return services;
        }
    }
}